package com.base.common.persistent.dao;

import com.base.common.persistent.model.Message;
import com.cjy.common.annotation.MyBatisRepository;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 通知信息dao
 * @author kat.luhongkai
 *
 */
@MyBatisRepository
public interface MessageMapper {
	
	/**
	 * 
	 * @param start
	 * @param end
	 * @param categories
	 * @param compoundsId
	 * @return
	 */
	List<Message> queryMessagesByCategory(@Param(value = "start") int start, @Param(value = "end") int end, @Param(value = "typeId") int typeId);
	
	/**
	 * 查询文章类型id根据字段名和小区id
	 * 
	 * @param compoundsId	小区id
	 * @param field	字段名
	 * @return
	 */
	int queryTypeIdByCompoundsIdAndField(@Param(value = "compoundsId") int compoundsId, @Param(value = "field") String field);
	
	/**
	 * 测试
	 * 
	 * @return
	 */
	List<Message> test(@Param(value = "start") int start, @Param(value = "end") int end, @Param(value = "typeId") int typeId);
}
